package com.ikingtech.platform.service.application.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ikingtech.framework.sdk.utils.Tools;
import com.ikingtech.platform.service.application.entity.ApplicationGeneralDataDO;
import com.ikingtech.platform.service.application.mapper.ApplicationGeneralDataMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tie yan
 */
@Service
public class ApplicationGeneralDataService extends ServiceImpl<ApplicationGeneralDataMapper, ApplicationGeneralDataDO> {

    public List<ApplicationGeneralDataDO> listByPageIdAndBusinessCode(String pageId, String businessCode) {
        return this.list(Wrappers.<ApplicationGeneralDataDO>lambdaQuery()
                .eq(ApplicationGeneralDataDO::getPageId, pageId)
                .eq(Tools.Str.isNotBlank(businessCode), ApplicationGeneralDataDO::getBusinessCode, businessCode));
    }
}
